﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PricingRoadForSales.Edit.aspx.cs"
    Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css" />
    <script type='text/javascript' src="assets/js/jquery.ui.datepicker.js"></script>
    <script type="text/javascript">
        function ReloadOpener() {
            window.opener.location.reload();
            window.close();
        }
        function OnGoodsSelected(source, eventArgs) {

            var hdnValueID = "<%= txtGoodsCode.ClientID %>";
            //alert(" Key : " + eventArgs.get_text() + "  Value :  " + eventArgs.get_value()); 
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            //__doPostBack(hdnValueID, "");
            $("#txtGoodsName").focus();
        }
        function OnExIDSelected(source, eventArgs) {
            var hdnValueID = "<%= hidExID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtEx").focus();
        }
        function OnToIDSelected(source, eventArgs) {

            var hdnValueID = "<%= hidToID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtTo").focus();
        }
        function OnCustRelationSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCustRelID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtCus").focus();
        }
        function OnTruckerSelected(source, eventArgs) {

            var hdnValueID = "<%= hidTruckerID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtTrucker").focus();
        }
        $(document).ready(function () {
            $("#txtEtd").datepicker({ dateFormat: "D dd/mm/yy" });
            $("#txtEta").datepicker({ dateFormat: "D dd/mm/yy" });
        });
        $(document).ready(function () {
            $('#btnFormEmail').click(function () {
                //lấy giá trị thuộc tính href - chính là phần tử "#login-box"                
                //cho hiện hộp đăng nhập trong 300ms
                $("#formEmail").fadeIn(300);
                //CopyToClipboard("Panel1");
                // thêm phần tử id="over" vào sau body
                $('body').append('<div id="over">');
                $('#over').fadeIn(300);

                return false;
            });

            // khi click đóng hộp thoại
            $(document).on('click', "a.close, #over", function () {
                $('#over, .email').fadeOut(300, function () {
                    $('#over').remove();
                });
                return false;
            });
        });
        function CopyToClipboard(id) {
            var id;
            var text = document.all(id).innerText;
            if (window.clipboardData.setData("Text", text)) {
                alert("copy succeed!");
            }
        }
    </script>
    <style type="text/css">
        /*phần tử phủ toàn màn hình,không được hiển thị*/
        #over
        {
            display: none;
            background: #000;
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            opacity: 0.8;
            z-index: 999;
        }
        
        #footer
        {
            padding: 2px;
            border: 1px solid #5b958e;
            background-color: #e9eae5;
            width: 98%;
            left: 1px;
            bottom: 0px;
            position: fixed;
            height: 30px;
        }
        
        .keyex
        {
            font-weight: bold;
            background-color: #F6F6F6;
            padding: 5px;
            border: 1px solid #E9E9E9;
        }
        
        .red
        {
            font-color: red;
        }
        
        .email
        {
            background-color: #ffffff;
            height: auto;
            width: 450px; /*height: 450px;*/
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 14px;
            padding-bottom: 20px;
            border: 1px solid;
            display: none;
            overflow: hidden;
            position: absolute;
            z-index: 99999;
            margin: 0 auto;
            top: 100px;
            left: 350px;
        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="main-content1" style="padding: 0px; margin-left: 5px;">
            <div class="">
            </div>
            <h2>
                Pricing Road For Sales
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server" method="post">
                <div class="content-box-header">
                    <h3 style="cursor: s-resize;">
                        ENQUIRY
                        <asp:Label ID="lblError" runat="server" CssClass="msg-error" Text></asp:Label>
                        <asp:CheckBox ID="cbTargeted" runat="server" />
                    </h3>
                </div>
                <asp:Panel ID="plRequest" runat="server">
                    <table class="paramlist admintable " width="100%">
                        <tr>
                            <td class="key" align="left">
                                COMMD ( <span class="red">**</span> )
                            </td>
                            <td align="left" class="row">
                                <asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
                                </asp:ToolkitScriptManager>
                                <asp:TextBox ID="txtGoodsName" name="txtGoodsName" runat="server" Width="96%"></asp:TextBox>
                                <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" ServiceMethod="GoodsAutoCompleteAjaxRequest"
                                    ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                    EnableCaching="false" CompletionSetCount="10" TargetControlID="txtGoodsName"
                                    FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                    CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=":"
                                    OnClientItemSelected="OnGoodsSelected">
                                </asp:AutoCompleteExtender>
                            </td>
                            <td class="key" align="left" width="15%">
                                CODE
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtGoodsCode" name="txtGoodsCode" runat="server" Width="23%"></asp:TextBox>
                                ( <span class="red">**</span> )
                                <asp:TextBox ID="txtGoodsNote" name="txtGoodsNote" runat="server" Width="60%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left">
                                FACTORY ( <span class="red">*</span> )
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtEx" name="txtEx" runat="server" Width="96%"></asp:TextBox>
                                <asp:HiddenField ID="hidExID" runat="server" />
                                <asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" ServiceMethod="DistrictAutoCompleteAjaxRequest"
                                    ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                    EnableCaching="false" CompletionSetCount="10" TargetControlID="txtEx" FirstRowSelected="true"
                                    CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                    CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                    OnClientItemSelected="OnExIDSelected">
                                </asp:AutoCompleteExtender>
                            </td>
                            <td class="key" align="left" width="15%">
                                PORT ( <span class="red">*</span> )
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtTo" name="txtTo" runat="server" Width="92%"></asp:TextBox>
                                <asp:HiddenField ID="hidToID" runat="server" />
                                <asp:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" ServiceMethod="LocationAutoCompleteAjaxRequest"
                                    ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                    EnableCaching="false" CompletionSetCount="5" TargetControlID="txtTo" FirstRowSelected="true"
                                    CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                    CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                    OnClientItemSelected="OnToIDSelected">
                                </asp:AutoCompleteExtender>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left">
                                CONT ( <span class="red">*</span> )
                            </td>
                            <td align="left" class="row">
                                <asp:DropDownList ID="ddContRequest1" name="ddContRequest1" runat="server">
                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                    <asp:ListItem Text="20'" Value="Cont20"></asp:ListItem>
                                    <asp:ListItem Text="40'" Value="Cont40"></asp:ListItem>
                                </asp:DropDownList>
                                &nbsp <span class="keyex">VOL ( <span class="red">*</span> )</span>
                                <asp:TextBox ID="txtVolRequest1" name="txtVolRequest1" runat="server" Width="62px"></asp:TextBox>
                                &nbsp <span class="keyex">PAYLOAD(T) ( <span class="red">*</span> )</span>
                                <asp:TextBox ID="txtPayload1" name="txtPayload1" runat="server" Width="20%"></asp:TextBox>
                            </td>
                            <td class="key" align="left" width="15%">
                                CONT
                            </td>
                            <td align="left" class="row">
                                <asp:DropDownList ID="ddContRequest2" name="ddContRequest2" runat="server">
                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                    <asp:ListItem Text="20'" Value="Cont20"></asp:ListItem>
                                    <asp:ListItem Text="40'" Value="Cont40"></asp:ListItem>
                                </asp:DropDownList>
                                &nbsp <span class="keyex">VOL</span>
                                <asp:TextBox ID="txtVolRequest2" name="txtVolRequest2" runat="server" Width="60px"></asp:TextBox>
                                &nbsp <span class="keyex">PAYLOAD(T)</span>
                                <asp:TextBox ID="txtPayload2" name="txtPayload2" runat="server" Width="18%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="15%">
                                CUST
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtCus" name="txtCus" runat="server" Width="92%"></asp:TextBox>
                                <asp:HiddenField ID="hidCustRelID" runat="server" />
                                <asp:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" ServiceMethod="CustomerOfUserAutoCompleteAjaxRequest"
                                    ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                    EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCus" FirstRowSelected="true"
                                    CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                    CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                    OnClientItemSelected="OnCustRelationSelected">
                                </asp:AutoCompleteExtender>
                            </td>
                            <td class="key" align="left" width="15%">
                                <%--Note--%>
                            </td>
                            <td align="left" class="row">
                                <%--<asp:TextBox ID="txtNote_Request" name="txtNote_Request" runat="server" Width="92%"></asp:TextBox>--%>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="plKeySolution" runat="server">
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            KEY SOLUTION
                        </h3>
                        <div class="clear">
                        </div>
                    </div>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td class="key" align="left">
                                20'
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtCont20" name="txtCont20" runat="server"></asp:TextBox>
                            </td>
                            <td class="key" align="left">
                                Vnd/Kms
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblVndKms20" name="lblVndKms20" runat="server"></asp:Label>
                            </td>
                            <td class="key" align="left" width="20%">
                                40'
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtCont40" name="txtCont40" runat="server"></asp:TextBox>
                            </td>
                            <td class="key" align="left">
                                Vnd/Kms
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblVndKms40" name="lblVndKms40" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left">
                                Trucker
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtTrucker" name="txtTrucker" runat="server"></asp:TextBox>
                                <asp:HiddenField ID="hidTruckerID" runat="server" />
                                <asp:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" ServiceMethod="TruckerAutoCompleteAjaxRequest"
                                    ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                    EnableCaching="false" CompletionSetCount="10" TargetControlID="txtTrucker" FirstRowSelected="true"
                                    CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                    CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                    OnClientItemSelected="OnTruckerSelected">
                                </asp:AutoCompleteExtender>
                            </td>
                            <td class="key" align="left">
                                Sure
                            </td>
                            <td align="left" class="row" colspan="3">
                                <asp:RadioButtonList ID="rdSure" runat="server" RepeatDirection="Horizontal" CellPadding="0"
                                    CellSpacing="0">
                                    <asp:ListItem Text="<img src='Assets/images/star_1.gif'/>" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="<img src='Assets/images/star_1.gif'/><img src='Assets/images/star_1.gif'/>"
                                        Value="2" Selected="True"></asp:ListItem>
                                    <asp:ListItem Text="<img src='Assets/images/star_1.gif'/><img src='Assets/images/star_1.gif'/><img src='Assets/images/star_1.gif'/>"
                                        Value="3"></asp:ListItem>
                                </asp:RadioButtonList>
                                <%--<asp:TextBox ID="txtSure" name="txtSure" runat="server" Width="85%"></asp:TextBox>--%>
                            </td>
                            <td class="key" align="left" width="20%">
                                BKG
                            </td>
                            <td align="left" class="row">
                                <asp:CheckBox ID="cbBKG" runat="server" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="Panel2" runat="server">
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            NOTE AND FEEDBACK
                        </h3>
                        <div class="clear">
                        </div>
                        <table class="paramlist admintable" width="100%">
                            <tr>
                                <td class="key" align="left" width="20%">
                                    NOTE
                                </td>
                                <td align="left" class="row">
                                    <asp:TextBox ID="txtNoteResponse" name="txtNoteResponse" runat="server" Width="96%"></asp:TextBox>
                                </td>
                                <td class="key" align="left" width="20%">
                                    FEEDBACK
                                </td>
                                <td align="left" class="row">
                                    <asp:TextBox ID="txtIdea" name="txtIdea" runat="server" Width="96%"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
                <div style="display: inline;" id="footer">
                    <asp:Button ID="btnSave" runat="server" Text="Update" class="button" OnClick="btnSave_Click" />
                    <asp:Label ID="lblNotice" runat="server" CssClass="error"></asp:Label>
                    <%-- <input type="button" id="Exit" value="Exit" class="button" onclick="ReloadOpener();" />--%>
                </div>
                </form>
            </div>
            <b>Note:</b>
            <p style="padding: 3px;">
                <i>(<span class="red">*</span>) Bắt buộc phải nhập thông tin</i>
            </p>
            <p style="padding: 3px;">
                <i>(<span class="red">**</span>) Phải nhập thông tin một trong các ô này</i>
            </p>
        </div>
    </div>
</body>
</html>
